#! /bin/bash

if [ $# -ne  2 ]; then
    echo "usage convert.sh file.obj file.off"
fi

cat $1 | grep 'v '  | wc -l >  aux
cat $1 | grep 'vt ' | wc -l >> aux
cat $1 | grep 'f '  | wc -l >> aux

cat $1 | grep 'v '  >> aux
cat $1 | grep 'vt ' >> aux
cat $1 | grep 'f '  >> aux

./convert aux $2

rm aux